<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;

/**
 * 替换Illuminate\Hashing\HashServiceProvider::class
 * Class HashServiceProvider
 * @package App\Providers
 */
class HashServiceProvider extends ServiceProvider
{
    /**
     * Bootstrap the application services.
     *
     * @return void
     */
    public function boot()
    {
        //
    }

    /**
     * Register the application services.
     *
     * @return void
     */
    public function register()
    {
        //
        $this->app->singleton('hash', function () {
            return new Md5SaltHasher;
        });
    }
}
